/***************************************************************************
 > Filename   : awinic_9818.h
 > Author     : oneface - one_face@sina.com
 > Company    : 一尊还酹江月
 > Time       : 2018-06-04 15:29:31
 > Description: 

 - This program is free software; you can redistribute it and/or modify it
 - under the terms of the GNU General Public License as published by the
 - Free Software Foundation;  either version 2 of the  License, or (at your
 - option) any later version.
 **************************************************************************/
#ifndef __AWINIC_9818_H__
#define __AWINIC_9818_H__

typedef unsigned char byte;

typedef enum {
	none = 0,
	red,
	orange,
	yellow,
	green,
	blue,
	indigo,
	purple,
	white,
	LED_MAX_COLOR
} LED_COLOR;

struct led_ctrl_arg {
	int orientation;
	LED_COLOR color;
	byte brightness;
	byte airkiss_config;
	byte is_mute;
	byte apk_ota_progress;
	byte volume;
};

typedef enum {
	LEDS_EFFECT_NONE = 0,
	LEDS_EFFECT_STARTUP,    /*board power on */
	LEDS_EFFECT_COMPLETE,   /*board startup over */
	LEDS_EFFECT_AIRKISS_MODE,   /*in airkiss mode */
	LEDS_EFFECT_AIRKISS_CONFIG, /*config airkiss */
	LEDS_EFFECT_AIRKISS_CONNECTED,  /*airkiss connected */
	LEDS_EFFECT_WAKE_UP,    /*voice wake up */
	LEDS_EFFECT_COMMAND_FAIL,   /*voice command failed */
	LEDS_EFFECT_COMMAND_SUCCESS,    /*voice command success */
	LEDS_EFFECT_KEYMUTE,    /*key mute record */
	LEDS_EFFECT_KEYUNMUTE,  /*key cancel mute record */
	LEDS_EFFECT_VOLUME_CHANGE,
	LEDS_EFFECT_BRIGHT_CHANGE,
	LEDS_EFFECT_COLOR_CHANGE,
	LEDS_EFFECT_IMAX_CHANGE,
	LEDS_EFFECT_TOTAL
} LED_EFFECT_ENUM;

#define AW9818_IOC_MAGIC 'm'
#define AW9818_LEDS_EFFECT_NONE                 _IOW(AW9818_IOC_MAGIC, LEDS_EFFECT_NONE, int)
#define AW9818_LEDS_EFFECT_STARTUP              _IOW(AW9818_IOC_MAGIC, LEDS_EFFECT_STARTUP, int)
#define AW9818_LEDS_EFFECT_COMPLETE             _IOW(AW9818_IOC_MAGIC, LEDS_EFFECT_COMPLETE, int)
#define AW9818_LEDS_EFFECT_AIRKISS_MODE         _IOW(AW9818_IOC_MAGIC, LEDS_EFFECT_AIRKISS_MODE, int)
#define AW9818_LEDS_EFFECT_AIRKISS_CONFIG       _IOW(AW9818_IOC_MAGIC, LEDS_EFFECT_AIRKISS_CONFIG, int)
#define AW9818_LEDS_EFFECT_AIRKISS_CONNECTED    _IOW(AW9818_IOC_MAGIC, LEDS_EFFECT_AIRKISS_CONNECTED, int)
#define AW9818_LEDS_EFFECT_WAKE_UP              _IOW(AW9818_IOC_MAGIC, LEDS_EFFECT_WAKE_UP, int)
#define AW9818_LEDS_EFFECT_COMMAND_FAIL         _IOW(AW9818_IOC_MAGIC, LEDS_EFFECT_COMMAND_FAIL, int)
#define AW9818_LEDS_EFFECT_COMMAND_SUCCESS      _IOW(AW9818_IOC_MAGIC, LEDS_EFFECT_COMMAND_SUCCESS, int)
#define AW9818_LEDS_EFFECT_KEYMUTE              _IOW(AW9818_IOC_MAGIC, LEDS_EFFECT_KEYMUTE, int)
#define AW9818_LEDS_EFFECT_KEYUNMUTE            _IOW(AW9818_IOC_MAGIC, LEDS_EFFECT_KEYUNMUTE, int)
#define AW9818_LEDS_EFFECT_VOLUME_CHANGE        _IOW(AW9818_IOC_MAGIC, LEDS_EFFECT_VOLUME_CHANGE, int)

#endif /* __AWINIC_9818_H__*/
